package com.study.flink.java.day04_async;

import com.study.flink.java.utils.FlinkUtilsDemo;
import org.apache.flink.api.common.serialization.SimpleStringSchema;
import org.apache.flink.streaming.api.datastream.DataStream;
import org.apache.flink.streaming.api.datastream.SingleOutputStreamOperator;

/**
 * 从外部调用http取数
 * 最后sink打印
 */
public class QueryActivityBalanceMain {

    public static void main(String[] args) throws Exception {
        DataStream<String> lines = FlinkUtilsDemo.createKafkaStream(args, new SimpleStringSchema());
        SingleOutputStreamOperator<ActivityBean> beans = lines.map(new BalanceToActivityBeanFunction());
        beans.print();
        FlinkUtilsDemo.getEnv().execute("QueryActivityBalance");
    }


}
